﻿using SqlSugar;
using System;
using Infov1.Models.Communication;



namespace Infov1.Models.WorkForm
{
    /// <summary>
    /// 工作记录
    /// </summary>
    [SugarTable("k_work_record")]
    public class WorkRecordModel
    {
        [SugarColumn(ColumnName = "record_id", IsPrimaryKey = true, IsIdentity = true)]
        public int RecordId { get; set; }
        [SugarColumn(ColumnName = "kh_id")]
        public int CustomerId { get; set; }
        [SugarColumn(ColumnName = "comm_type_code")]
        public string CommTypeCode { get; set; }

        [SugarColumn(ColumnName = "customer_code")]
        public string CustomerCode { get; set; }

        [SugarColumn(ColumnName = "is_remote")]
        public bool IsRemote { get; set; }

        [SugarColumn(ColumnName = "details", IsNullable = true)]
        public string Details { get; set; }

        [SugarColumn(ColumnName = "result", IsNullable = true)]
        public string Result { get; set; }

        [SugarColumn(ColumnName = "creation_time")]
        public DateTime CreationTime { get; set; }
        [SugarColumn(ColumnName = "operator")]
        public String Operator { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(CommTypeCode))]
        public CommunicationTypeModel CommType { get; set; }

        [Navigate(NavigateType.OneToOne, nameof(CustomerCode))]
        public CustomerInfoModel Customer { get; set; }
    }
}